3.1118 \(\int \frac {(d+e x^2) (a+b \tan ^{-1}(c x))}{x} \, dx\)

Optimal. Leaf size=77 \[ \frac {1}{2} e x^2 \left (a+b \tan ^{-1}(c x)\right )+a d \log (x)+\frac {b e \tan ^{-1}(c x)}{2 c^2}+\frac {1}{2} i b d \text {Li}_2(-i c x)-\frac {1}{2} i b d \text {Li}_2(i c x)-\frac {b e x}{2 c} \]

[Out]

-1/2*b*e*x/c+1/2*b*e*arctan(c*x)/c^2+1/2*e*x^2*(a+b*arctan(c*x))+a*d*ln(x)+1/2*I*b*d*polylog(2,-I*c*x)-1/2*I*b
*d*polylog(2,I*c*x)

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {4980, 4848, 2391, 4852, 321, 203} \[ \frac {1}{2} i b d \text {PolyLog}(2,-i c x)-\frac {1}{2} i b d \text {PolyLog}(2,i c x)+\frac {1}{2} e x^2 \left (a+b \tan ^{-1}(c x)\right )+a d \log (x)+\frac {b e \tan ^{-1}(c x)}{2 c^2}-\frac {b e x}{2 c} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x^2)*(a + b*ArcTan[c*x]))/x,x]

[Out]

-(b*e*x)/(2*c) + (b*e*ArcTan[c*x])/(2*c^2) + (e*x^2*(a + b*ArcTan[c*x]))/2 + a*d*Log[x] + (I/2)*b*d*PolyLog[2,
 (-I)*c*x] - (I/2)*b*d*PolyLog[2, I*c*x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 4852

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
n[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^
2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 4980

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With
[{u = ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x^2)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b,
 c, d, e, f, m}, x] && IntegerQ[q] && IGtQ[p, 0] && ((EqQ[p, 1] && GtQ[q, 0]) || IntegerQ[m])

Rubi steps

\begin {align*} \int \frac {\left (d+e x^2\right ) \left (a+b \tan ^{-1}(c x)\right )}{x} \, dx &=\int \left (\frac {d \left (a+b \tan ^{-1}(c x)\right )}{x}+e x \left (a+b \tan ^{-1}(c x)\right )\right ) \, dx\\ &=d \int \frac {a+b \tan ^{-1}(c x)}{x} \, dx+e \int x \left (a+b \tan ^{-1}(c x)\right ) \, dx\\ &=\frac {1}{2} e x^2 \left (a+b \tan ^{-1}(c x)\right )+a d \log (x)+\frac {1}{2} (i b d) \int \frac {\log (1-i c x)}{x} \, dx-\frac {1}{2} (i b d) \int \frac {\log (1+i c x)}{x} \, dx-\frac {1}{2} (b c e) \int \frac {x^2}{1+c^2 x^2} \, dx\\ &=-\frac {b e x}{2 c}+\frac {1}{2} e x^2 \left (a+b \tan ^{-1}(c x)\right )+a d \log (x)+\frac {1}{2} i b d \text {Li}_2(-i c x)-\frac {1}{2} i b d \text {Li}_2(i c x)+\frac {(b e) \int \frac {1}{1+c^2 x^2} \, dx}{2 c}\\ &=-\frac {b e x}{2 c}+\frac {b e \tan ^{-1}(c x)}{2 c^2}+\frac {1}{2} e x^2 \left (a+b \tan ^{-1}(c x)\right )+a d \log (x)+\frac {1}{2} i b d \text {Li}_2(-i c x)-\frac {1}{2} i b d \text {Li}_2(i c x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 83, normalized size = 1.08 \[ a d \log (x)+\frac {1}{2} a e x^2+\frac {b e \tan ^{-1}(c x)}{2 c^2}+\frac {1}{2} i b d \text {Li}_2(-i c x)-\frac {1}{2} i b d \text {Li}_2(i c x)+\frac {1}{2} b e x^2 \tan ^{-1}(c x)-\frac {b e x}{2 c} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^2)*(a + b*ArcTan[c*x]))/x,x]

[Out]

-1/2*(b*e*x)/c + (a*e*x^2)/2 + (b*e*ArcTan[c*x])/(2*c^2) + (b*e*x^2*ArcTan[c*x])/2 + a*d*Log[x] + (I/2)*b*d*Po
lyLog[2, (-I)*c*x] - (I/2)*b*d*PolyLog[2, I*c*x]

________________________________________________________________________________________

fricas [F]  time = 0.43, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {a e x^{2} + a d + {\left (b e x^{2} + b d\right )} \arctan \left (c x\right )}{x}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*arctan(c*x))/x,x, algorithm="fricas")

[Out]

integral((a*e*x^2 + a*d + (b*e*x^2 + b*d)*arctan(c*x))/x, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*arctan(c*x))/x,x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

maple [A]  time = 0.06, size = 117, normalized size = 1.52 \[ \frac {a \,x^{2} e}{2}+d a \ln \left (c x \right )+\frac {\arctan \left (c x \right ) b e \,x^{2}}{2}+b \arctan \left (c x \right ) d \ln \left (c x \right )+\frac {b e \arctan \left (c x \right )}{2 c^{2}}-\frac {b e x}{2 c}+\frac {i b d \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}-\frac {i b d \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}+\frac {i b d \dilog \left (i c x +1\right )}{2}-\frac {i b d \dilog \left (-i c x +1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x^2+d)*(a+b*arctan(c*x))/x,x)

[Out]

1/2*a*x^2*e+d*a*ln(c*x)+1/2*arctan(c*x)*b*e*x^2+b*arctan(c*x)*d*ln(c*x)+1/2*b*e*arctan(c*x)/c^2-1/2*b*e*x/c+1/
2*I*b*d*ln(c*x)*ln(1+I*c*x)-1/2*I*b*d*ln(c*x)*ln(1-I*c*x)+1/2*I*b*d*dilog(1+I*c*x)-1/2*I*b*d*dilog(1-I*c*x)

________________________________________________________________________________________

maxima [A]  time = 0.62, size = 104, normalized size = 1.35 \[ \frac {1}{2} \, a e x^{2} + a d \log \relax (x) - \frac {\pi b c^{2} d \log \left (c^{2} x^{2} + 1\right ) - 4 \, b c^{2} d \arctan \left (c x\right ) \log \left (c x\right ) + 2 i \, b c^{2} d {\rm Li}_2\left (i \, c x + 1\right ) - 2 i \, b c^{2} d {\rm Li}_2\left (-i \, c x + 1\right ) + 2 \, b c e x - 2 \, {\left (b c^{2} e x^{2} + b e\right )} \arctan \left (c x\right )}{4 \, c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*arctan(c*x))/x,x, algorithm="maxima")

[Out]

1/2*a*e*x^2 + a*d*log(x) - 1/4*(pi*b*c^2*d*log(c^2*x^2 + 1) - 4*b*c^2*d*arctan(c*x)*log(c*x) + 2*I*b*c^2*d*dil
og(I*c*x + 1) - 2*I*b*c^2*d*dilog(-I*c*x + 1) + 2*b*c*e*x - 2*(b*c^2*e*x^2 + b*e)*arctan(c*x))/c^2

________________________________________________________________________________________

mupad [B]  time = 0.68, size = 88, normalized size = 1.14 \[ \left \{\begin {array}{cl} \frac {a\,\left (e\,x^2+2\,d\,\ln \relax (x)\right )}{2} & \text {\ if\ \ }c=0\\ \frac {a\,\left (e\,x^2+2\,d\,\ln \relax (x)\right )}{2}-b\,e\,\left (\frac {x}{2\,c}-\mathrm {atan}\left (c\,x\right )\,\left (\frac {1}{2\,c^2}+\frac {x^2}{2}\right )\right )-\frac {b\,d\,\left ({\mathrm {Li}}_{\mathrm {2}}\left (1-c\,x\,1{}\mathrm {i}\right )-{\mathrm {Li}}_{\mathrm {2}}\left (1+c\,x\,1{}\mathrm {i}\right )\right )\,1{}\mathrm {i}}{2} & \text {\ if\ \ }c\neq 0 \end {array}\right . \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*atan(c*x))*(d + e*x^2))/x,x)

[Out]

piecewise(c == 0, (a*(e*x^2 + 2*d*log(x)))/2, c ~= 0, (a*(e*x^2 + 2*d*log(x)))/2 - b*e*(x/(2*c) - atan(c*x)*(1
/(2*c^2) + x^2/2)) - (b*d*(dilog(- c*x*1i + 1) - dilog(c*x*1i + 1))*1i)/2)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \operatorname {atan}{\left (c x \right )}\right ) \left (d + e x^{2}\right )}{x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x**2+d)*(a+b*atan(c*x))/x,x)

[Out]

Integral((a + b*atan(c*x))*(d + e*x**2)/x, x)

________________________________________________________________________________________